Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(popover): popover首次弹窗被遮挡和箭头优化 #1132

Merged
merged 1 commit into from
Oct 23, 2023

Conversation

LoopZhou
Copy link
Collaborator

@LoopZhou LoopZhou commented Oct 19, 2023

🤔 这个 PR 的性质是?

  • 日常 bug 修复
  • 新特性提交
  • 文档改进
  • 演示代码改进
  • 组件样式/交互改进
  • CI/CD 改进
  • 重构
  • 代码风格优化
  • 测试用例
  • 分支合并
  • 其他

🔗 相关 Issue

fix #1127

💡 需求背景和解决方案

  1. popover首次弹窗被遮挡: updatePopper 增加 currentVisible的判断

  2. 箭头优化:
    使用popperjs的arrow配置,由popperjs来处理arrow位置: https://popper.js.org/docs/v2/modifiers/arrow/

    popperjs的arrow,默认是居中显示, 所以在配置top/left/right/bottom, 直接使用popperjs默认的配置。文本较长时,箭头是居中显示:

image

其他方向使用padding配置偏移。

right-top/right-bottom/left-top/left-bottom,纵向偏移配置top和bottom, 是相对popper高度偏移

image

top-left/top-right/bottom-left/bottom-right,横向偏移配置left和right, 是相对popper宽度偏移, 同时考虑超过空间的情况

image

image

image

📝 更新日志

  • fix(Popover): 修复气泡首次弹出被遮挡的问题以及优化箭头

  • 本条 PR 不需要纳入 Changelog

☑️ 请求合并前的自查清单

⚠️ 请自检并全部勾选全部选项⚠️

  • 文档已补充或无须补充
  • 代码演示已提供或无须提供
  • TypeScript 定义已补充或无须补充
  • Changelog 已提供或无须提供

@github-actions
Copy link
Contributor

完成

@anlyyao anlyyao merged commit 9381cc4 into Tencent:develop Oct 23, 2023
5 checks passed
@github-actions github-actions bot mentioned this pull request Oct 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Popover] 弹窗被遮挡以及弹窗箭头位置没对齐
2 participants